package com.jiangnansheji.qf.oauth2.test;

import com.jiangnansheji.qf.oauth2.test.Interceptor.BasicAuthInterceptor;
import okhttp3.OkHttpClient;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;

@SpringBootApplication
public class OAuth2TestApplication {
    public static void main(String[] args) {
        SpringApplication.run(OAuth2TestApplication.class,args);
    }

    @Bean
    public OkHttpClient okHttpClient(){
        return new OkHttpClient.Builder().addInterceptor(new BasicAuthInterceptor("client3", "secret")).build();
    }
}
